Startseite

ImageQuery
Metadata search tool for digital images

© 2004 Midnight! Software.
Cool freeware since 1982.

What does ImageQuery do?
Laern more about ImageQuery and how it helps you finding the images you are looking for.

Installation
Informations about system requirements and installation.

What’s new in this release?
FInd out what has been improved since the last release.

Working with ImageQuery
This section shows you everything you need to know about ImageQuery.

Disclaimer

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


What does ImageQuery?

Ever wanted to find all these images from that marvelous party down south at Key West? Just needed the filenames and the size to see if you can get it on ca CD and store them? Do you need to find out all pictures made with a certain camera model that have been shot using a flash? All you have to use is ImageQuery!

ImageQuery searches for JPG images based on meta data. Meta data means additional information beside the picture itself that is stored in the .jpg file. Nearly all digital cameras and image processing software store and/or retrieve this additional information. Using ImageQuery you can easily search for images matching the criteria you specify using an easy to learn query language. There is no need to use an image database or try to collect all these image captions, comments and EXIF data in a database (that will never be up to date, by the way). Just execute a query using ImageQuery and you will get a customizable result including preview pictures and complete file information. This makes ImageQuery the ideal tool for photographers, image editors and everybody owning a large collection of digital images.

Want a quick example? Can your image viewer/database do this?

  • SELECT Mode, DateTimeOriginal, FNumber, ShutterSpeedValue
    FROM c:\pics\*.jpg
    WHERE Upper(Make) == 'CANON'
  • SELECT Name, IsNull(DateTimeOriginal, ‘No picture date, file date is ‘ & DateCreated)
    FROM "g:\My Images\2004\ *.jpg
    WHERE ByLine = 'PhotographerName'
    WITH subdirs
  • SELECT Name, Size, Caption, ByLine
    FROM "g:\My Images\2004\ *.jpg
    WHERE (DatePart('month’, DateTimeOriginal) > 3) and (DatePart('month’, DateTimeOriginal) < 7)

Here is a list of some features that make ImageQuery the ideal tool for finding your best pictures!

· ImageQuery not only searches EXIF data, it also supports the IPTC metadata.

· Support for a SQL-like query language gives you complete control about searching.

· ImageQuery directly reads images files, no need for a database.

· No image file is changed or written to, ImageQuery concentrates on finding, not editing.

· Get results in a customizable format that supports even complex output expressions.

· Support for regular expressions in string searches, now you have the power of grep & perl at your hand.

· Multiple query buffers, re-use older queries with a single mouse click.

· No bloating installation, no run-times to install, one EXE is all you really need.


What's new

What’s new in this release

Version 1.3.1

  • The button for the save dialog on the XML export form didn’t work in 1.3.0, fixed in this minor maintenance release.
  • If no file extension is provided for the XML export file, .xml ist added automatically. If you really want to have file without extension, you have to specify a single dot as the last char of the file name.

Version 1.3.0

  • Search results may now be exported to a XML file. You may use the keyboard shortcut Shift-F12 to open the XML export form and set several options before starting the export.
  • The export form now features edit fields for file header and footer. Now you have full control over header and footer information for the file, data rows and columns.
  • The language selection form itself is now localized (sorry for this!). If you do a translation, just let me know and I will be glad to include it in the distribution file.
  • The keyboard shortcut for saving queries in the query buffer has been changed to [Ctrl][Alt][S] from 1.3.0 onward.
  • The file operations form now features the execution of external commands. Use the check overwrite prompt for a confirmation prompt before running each command.

Version 1.2.2

  • Removed a bug that caused IPTC fields to display only partial data for some files that contained NULL bytes (#00) in their IPTC field or that had more than one trailing NULL byte.

Version 1.2.1

  • The version number in the about box accidentally was a static text. Not displays the correct file version information.
  • String delimiters for constants in queries may be switched between single and double quotes in the settings dialog.

Version 1.2.0 (2004-09-30)

  • New sidebar for better access to all those field names.
  • Rearranged the controls on the file operations dialog for better usability.
  • Several small bugfixes.

Version 1.1.4 (2004-09-27)

  • Removed a bug that caused images with more than one keyword (IPTC field Keywords) to be ignored.
  • Added new ways to process results with a dialog for standard file actions (copy, delete, move, etc.).
  • Extended the right-click context menu for the result pane with the user-defined actions as well as the file operations.
  • More information in the online help and improved layout for the table of contents.

Version 1.1.3 (2004-09-26)

  • Changed the logic of automatic adjustment for column width. Now works much better when resizing the form.
  • Removed a bug that caused an access violation when selecting all fields in the query wizard.
  • Localization of all application hint texts and context menus

Version 1.1.2 (2004-09-25)

  • The query wizard has been localized.

Version 1.1.1 (2004-09-21)

  • Implementation of printing the results.
  • Bug fix when rendering thumbnails in protrait mode.
  • Clicking on column titles in detail view now sorts (switching between ascending and descending with every click).
  • A lot of changes in the online help. Still looking for volunteers to localize the EXIF and IPTC field descriptions.
  • Parserbug fixes for handling logical operators and better handling of NULL values (any standard operation with a Null value now yields Null also).
  • Last view mode selected is now also saved to the registry (see technical information for details).
  • Several minor changes and fixes.

Version 1.0 (2004-09-17)

First public release of ImageQuery.


Installation Page

System Requirements and Installation

System Requirements

ImageQuery runs on computers with Microsoft Windows 2000 or higher. While in fact nearly every system will support ImageQuery, we do recommend the hardware and software below:

Hardware

  • Pentium class CPU with a clocking speed of 500 MHz or above.
  • 256 MByte of RAM.
  • ImageQuery needs about 2 MByte of disk space, less than a single RAW image J.
  • A graphics card capable of displaying 16bit colors.

Software

  • Microsoft Windows 2000 and up (Home, Professional, Server)

Installation

This release is distributed in a ZIP archive. Just extract all files into a folder you desire and that’s about it. After that, you may start the program by double-clicking on the ImageQuery.exe executable.

Remove ImageQuery

Delete all files from the folder you extracted ImageQuery in. After that, delete the folder,if you wish to do so.


Main window

This is the window where you edit queries and view results. Mostly you will work within this window. Below is a screenshot of the main windows of ImageQuery.

If you have used at least one Windows application before, you should have no difficutlies using the menu bar and the toolbar. Each menu options and each toolbar which display a little tooltip when the mouse hovers over them. This text will include any shortcut keys, if defined. A more detailed description of the toolbar icons follows below.

The toolbar icons

The toolbar hosts button for often-used function of ImageQuery. Here is a screenshot of the toolbar area:

These button are explained in order from left to right in the list below:

  • Execute query
  • Abort query (only enabled when a query is running)
  • Thumbnail image view of results
  • Detail grid view of results
  • List view of results
  • Copy result filenames to clipboard (all names, of no selection)
  • Run the query wizard
  • Select next query from the query buffer
  • Select previous query from the query buffer
  • Store current query text in query buffer
  • Combobox to select query from buffer

The query area

This is a normal edit window where you enter the queries that define desired fields, search conditions and the like. If you ever used Notepad, you know how to edit within the query area. You may want to check out the defined keyboard shortcuts, they help a lot in editing a query.

The results pane

The results of a query will show up in this area. Using the menu or the toolbar buttons you can view the results as list, detailed report or preview images.

Important: please keep in mind that the first column defined after the SELECT keyword sets the caption for preview and list mode.


Credits

Keyboard Shortcuts

You can use the keyboard shortcuts from the table below to speed up working with ImageQuery.

Shortcut | Description
Ctrl-A | Select all text in query edit window
Ctrl-Alt-C | Copy selected filenames to clipboard (all, if no selection)
Ctrl-D | Switch to detail view in result pane
Ctrl-I | Switch to image view in result pane
Ctrl-E | Execute query
Ctrl-L | Switch to list view in result pane
Ctrl-O | Open a saved query and load it
Ctrl-S | Save query text to a file
F1 | Display help topics
Shift-F1 | If the cursor is on or next to a keyword, display context-sensitive help
F12 | Export results to a text file
Shift-F12 | Export results to a XML file
Ctrl-Alt-S | Save query to query buffer
Alt-Up | Retrieve previous query from buffer
Alt-Down | Retrieve next query from buffer

Meta field name completion

You don’t have to type all these long meta data field names! Just enter enough characters to reduce the candidates (say, the first two letters) and then press Ctrl-Tab. ImageQuery will complete the field name. If the name displayed is not then right one, just keep on holding down the Control key. Every other press of Tab (resulting in another Ctrl-Tab combination) will select the next field name matching the characters you typed before. If you release the Control key, the selected field name is accepted and the cursor jumps to the end of the field name to allow further text entry. While this sounds a lot more complicated than it acutally is, you will never use another way of entering field names, after you tried this.


Query Buffers

Query buffer

During development of the program there was a constant need to quickly flip between several queries for testing. While there is a feature for saving and loading queries, it quickly became a tedious task. That way the query buffer went into existence and the first users really liked it, so it stayed in the application. This section explains how it works and why it can save you typing.

Saving a query

Any time during editing a query, you may store the contents of the query edit area into a buffer list for later retrieval. You can do this by clicking the toolbar button, selecting the menu option "Query/Save to querylist" or by using the [Ctrl] [Alt][S] shortcut. This will open a small dialog box that allows you to set a name for the current query text, like so:

Setting the query name.

If you check the “Save timestamp” checkbox, a comment stating date and time of the query will be added. The current query text will then be added to the buffer list under the name you provided.

Retrieving a query

You can retrieve a query from the buffer by selecting the query you want to re-use from the combo box in the toolbar. It displays all saved queries in reverse chronological order (newest first). After selecting an entry, its associated query text will be assinged to the edit area. Be sure not to accidentally overwrite a query that has not been saved to disk or to the query buffer yet!

Selecting from the query buffer.

Alternatively, you may use the two arrow buttons (or the shortcuts [Alt][Down] and [Alt][Up]) to quickly step thru all queries in the buffer.

Removing a query from the buffer

If you no longer need a query, right-click on the entry in the combo box and select “Delete” from the context menu. This context menu also allows for the saving of a buffered query to disk.

Note for advanced users

The query buffer is stored in a plain text file in the application data folder of the current user’s profile. The file is named Midnight!Software\ImageQuery\querylist.txt under the app data folder. File structure is most simple: one query per line, the name for combo box ist the key, followed by an equal sign that separates name and query text. All occurenced of the vertical bar symbol are replaced with a CR/LF combination in the edit window. If the application cannot resolve the environment variable APPDATA upon exit, buffered queries will not be saved (APPDATA is standard from Windows 2000 upwards).


Query Wizard

The query wizard will guide you thru the process of generating a query. In a few easy steps you will have you own query up and running. This wizard is the ideal solution for simple queries or for learning the query language. If you retrieval needs are more sphisticated, you may be better writing you own queries (learn more here).

After starting the wizard from the menu or the toolbar, you will see the welcome screen below:

Figure 1: The query wizard’s welcome screen.

Actually, there is not much functionality, so we will jump right to the next screen by clicking on “Next >” …

Selecting the files

Figure 2: The selection of the files to search for.

Here you enter the filemask of the images you want to include in searching. In most cases, there is no need to change the default mask from *.jpg, but you may want to insert a file path before the file mask. If you do not want to type the path, just click on the button right to the edit box and a folder browser will show up.

Selecting the fields

Figure 3: Selecting the fields for the result list.

This step allows you to select the fields you want to have in the output list. The first column selected defines the caption for the list and preview image of the result pane. This is the reason there is a sensible default of “Name” here. You are, of course, free to change this to any other column you prefer. Change the ordering of the columns by using the two button right of the second list box.

Selecting a filter condition

Figure 4: Defining a filter condition (this is an optional step).

In some cases you do not want to list all the files in the filemask. Suppose your selection for output columns included the image caption. Now you only want to see images in the result pane that actually do have a caption. So you have to set a filter that says “only if the caption is not empty”. You can do this by selection the “caption” field from the combo box labelled “Select field”, then select the operator “!=” (not equal) from the middle combo box and finally entering the text '' (two consecutive single quotes) in the combo box labelled “Select value”. After that, click on the “Add OR” button. This will add you condition to the list of defined conditions. Continue, until you are satisfied with the list of conditions. If you want to combine an expression with a logical AND instead of OR, just lick on the “Add AND” button.

Finishing off

This step concluded the entering of informations for the wizard. If you now click “Finish”, the query will be generated in the query edit area. You may then modify the query to you liking. Execute the query by using CTRL-E or the green triangle toolbar button.

Note for advanced users:

Both combo boxes for the filtering condition allow the entry of individual text. Therefore you can also enter function calls or more complex expressions, but you may be better off entering the query manually and using the identifier completion (CTRL-TAB) and keyword help (learn more here).


Working with the sidebar

Introduction

As one reviewer put it , “edit the query is great, but who remembers all those field names?”. This is the reason I implemented a collapsible sidebar to give users an easy access to field names. Best of all, the contents of the sidebar can be re-arranged freely and you can add you own quick tip, if you like (learn more customizing the sidebar definition file here).

Activating the sidebar

You may activate the sidebar by using the menu option “View” / “Toggle sidebar” (the shortcut key is [F11]) or by using the toolbar. This action is a toggle switch, so executing that option again hides the sidebar again. Below is a screen shot with the sidebar visible at left side of the screen.

Activating the sidebar.

Using the sidebar

Just select a field with the mouse or the cusor keys. If you double-click on a field or press [ENTER], the field name will be inserted in the query edit area. You can even insert a while group (e.g. all IPTC Author fields) if you double-click in the group name.

Customizing the sidebar contents

The contents of the sidebar are filled from a text file with the name Sidetree.ini in the application folder of ImageQuery. This file contains one tree view entry per line. The hierarchy of the entries is built by indentation with a single space per level. Be careful not to use more than one space character per level or the file will not be used by ImageQuery and the sidebar will be disabled (you will get a message at start-up if this is the case). If you want to display a short tool tip or help text, you can add an equal sign after the entry name, followed by the text to be displayed (max. 80 chars).

Here is a short sample for the sidetree.ini file:

EXIF Fields

Group 1

Sub-Item of group 1=This is the help text

ANother sub-item=Wow, another help text

Group 2=Help texts for groups are OK

Group 2 sub-item

IPTC Fields

An entry=You don’t need to create groups, this will do fine.

A sample sidetree.ini file

User-specific sidebar contents

If you want to have user-specific sidebar content, just put a sidetree.ini file in the application data file for ImageQuery (which is located under you user profile folder). This will automatically override the default file from the ImageQuery folder. If you are not sure how to do this, ask you system administrator for help.


Processing the results

ImageQuery provides several ways to process the results of your query. Besides printing the result list, these operations fall into two categories: File operations and user-defined result actions. You can reach both groups by selecting the “Tools” menu and then “File Operations” or “Result actions”. Alternatively you may right-click with the mouse on the selected files to bring up the context menu shown below.

Result pane context menu

The context menu for working with the result set.

File operations

These are operations you may know from other applications. Using the file operations dialog you can copy, move, delete or do other things with the selected files. Learn more about file operations.

Result actions

If you have more sophisticated needs when processing query results, so can use the result actions to add user-defined external processes, like firing up PhotoSHop with the name of the file selected. This gives you total freedom in handling result sets. Learn more about user-defined actions.

ShowMetadata

Use this menu option to display a list of all meta tags and their value. This is a good way to quickly browse all information for a file.

Printing

Of course you may print the data as in detail view. Learn more about printing.

Exporting search results

If you would like to process the search results with other applications, it ist very easy to export the search results. Use menu options from the file menu or the keyboard shortcut [F12] to export flat files or use [Shift][F12] for an XML export of the results.


Dateioperationen

File Operations

Introduction

To process the query results, select the files from the result pane. After doing this, you can show the file operations dialog by seelcting the menu optoin “Tools” / “File operations” or via the right-click context menu of the result pane.

Important!

Deactivating the „Always prompt ...“ option can be dangerous. Only do this if you know what you are doing. With the “Always prompt…” option disabled all further copy, move or delete operations will run without asking for confirmation! The author disclaims any responsibility for loss of data by accidental deletion or damage of files!

The File Operations Dialog

Here you work with the results.

If you do not want to enter the target paths or files names in the edit fields next to the buttons, you may want to click on the small speed buttons labelled “…” to bring up the Windows folder browser.

Copy to

Copies the selected files from the result pane to the folder specified in the edit field right to the button. If the option “Always prompt…” has been activated, you will be prompted for the overwriting of existing files.

Move to

Moves the selected files from the result pane to the folder specified in the edit field right to the button. If the option “Always prompt…” has been activated, you will be prompted for the overwriting of existing files. Since moving means that the file is removed from its original location, all files moved will also be removed from the result set in the result pane.

Copy thumbnails

Copies the thumbnailpreviews from all selected files into the target folder specified in the edit filed next to the button. The name of the files will remain the same with the prefix “THUMB_” added before the original filename.

Save names to

Creates a text file containing one full filename per line. The file path and name has to be specified in the edit field next to the button. You may use the ellipsis button rightto the edit field to bring up a file save dialog that allows for the graphical selection of the target file.

Run command

Use this edit field to enter any program name, batch file or operating system command to be run on each file of the result set. Use the symbol $filename to insert the current file name anywhere in the command line. If the option “Always prompt…” has been activated, you will be prompted for each file’s command.

Delete

Deletes the selected files from the result. If the option “Always prompt…” has been activated, you will be prompted for the deletion of each file.

Open folder

Opend the Windows explorer with the folders containing the selected files.


Drucken der Ergebnisse

Printing results

If you want to get the results of your query on paper, just select „File“ / „Print ...“ from the menu bar or use the shortcut [Ctrl][P]. This will activate the dialog shown below where you can set several options before starting the print job.

The print dialog.

Select printer

This combo box shows a list of all printers installed in your system. Select the printer that should receive the data. You can cahnge printer options by clicking the „Setup …” button.

Page margins

Define page margins here. All units are millimeteres (1 inch = 25.4 mm), so the default of 20mm equals about a ¾". Please note that there is no check if the numbers here do make sense. If you enter 254mm (10 inches) of left margin, ImageQuery assumes you know what you are doing!

Print options

The button „Font“ selects the font for the data columns. The demo text panel on the right will show your selection.

The option „names without path“ may be useful if your query searches only a single directory (learn more about the WITH option here). Printing without the file path will then save space on the printout, if you use more than 2 columns per line.

The option „Print previews“ will print a thumbnail of the image next to the data columns you selected (see SELECT). If you print more than three columns in a row, you should disable this option to get a usable printout.

Enter the number of columns per row into the spin edit or use the little up and down arrows to select a value (minimum 1, maximum 4).

A sample printout

Here you can see a scaled-down image of a printout:

Ein Beispielausdruck


Ergebnisaktionen

Result actions

Introduction

A result action is a way of customizing ImageQuery for you specific needs. You select all files from the result pane you wish to processand then select the appropriate action from the “Tools” / “Result actions” menu. Defining an action is done in a few simple steps shown below. For example, you might want to integrate the activation of the famous IrfanView image browser into ImageQuery.

Aktionen bestehen aus folgenden Elementen:

  • A menu text for display
  • The name of the executable program or the URL
  • Commandline-Paramters (where every occurence of $FILENAME is replaced by the current file name)
  • Optionally a shortcut key combination

Creating a user-defined result action

  1. Open the „Tools“ / „Settings ...“ menu dialog.
  2. Click on the „Actions“ tab.
  3. Click on „Add“ and fill in the fields as shown below:

  4. Close the dialog by clicking „OK“. Your action is not ready to use.

Remarks

You can use any key combination of CTRL, ALT and 0-9 as well as A-Z keys. Be careful not to override standard shortcuts like CTRL-C oder ALT-F4, as result actions take precedence over standard shortcuts.


Export results

Exporting results

ImageQuery supports the export of result lists to a file. You can start the export by using [F12] or using the menu or toolbar actions. After you do this, the export settings dialog shown below will appear.

The export settings dialog box.

Dialog box fields

File name

The export filename defines the target file for the export. Click the folder button right to edit box for a folder browser.

Column delimiter

You can set arbitrary text as the column delimiter using the edit field of the combo box. The most common choices are already listed, if you drop down the combo box list.

String quoting

String quoting for CSV export is quite a difficult matter. As there is no offical “spec” for CSV, we provided several choices for you:

  • Double existing quotes (Excel-like): will double any quotes found ( "Hi!" è ""Hi!"")
  • Backslash quotes (Unix-like): will mark quotes by escaping them with a backslash character (How's è How\'s)
  • Other one: if the string contains single quotes, it will be enclosed with double quotes and vice versa ("Hi!" è ' "Hi!" ')
  • Hex quote: will convert quotes within string data into hex code (How's è How0x27)

The column and line padding edit boxes give you total freedom in selection any prefix or postfox text for columns and data lines. For example, if you enter tag names here, a simple XML structure export is a breeze!

File header and footer

You may enter any string for the header and/or footer edit field. This text will be displayed before the first date line respectively after the last data line.

Line texts

If you need special header and footer texts for data lines, enter this information here.

Column texts

Use these edit fields to provide any column header or footer text you would like to insert into the export file.

After you click the OK button, the export will start. Click on Cancel to abort the export.


Export XML

Exporting results as XML

ImageQuery supports the export of result lists to a file. You can start the export by using [F12] or using the menu or toolbar actions. After you do this, the export settings dialog shown below will appear.

The export settings dialog box.

Dialog box fields

Export file name

The export filename defines the target file for the export. Click the folder button right to edit box for a folder browser.

Root element

You can set the name of the root element for then export, if you do not want to name it “files”.

Tag type

The default selection is to export tag names as text and as hex codes for unknown tags (e.g. 0x104f).

<metainfo tagname="size">303100</metainfo>

If you select the “Tags as numbers option”, the meta tags will be esported like so:

<metainfo tagname="0x1234">303100</metainfo>

Sample export file

The listing below shows the sample export for a file. Numerical or timestamp data will be written out as normal element content, while other data type (strings, arrays, etc.) will be written out as CDATA sections enclosed in a cdata tag to make XSLT processing easier (see the URL http://www.azureus.com/xml/art_creating_cdata_sections_in_xslt.htm for details on this). Please note that for brevetiy I only included three meta tags per group in the export file.

<?xml version="1.0" encoding="UTF-8" ?>

<files>

<file name="vonWirth-Bild01.jpg">

<filedata>

<metainfo tagname="fullname"><cdata><![CDATA[H:\TestJpgs\Bild01.jpg]]></cdata></metainfo>

<metainfo tagname="size">303100</metainfo>

<metainfo tagname="path"><cdata><![CDATA[H:\TestJpgs]]></cdata></metainfo>

</filedata>

<app0data>

<metainfo tagname="version"><cdata><![CDATA[1.01]]></cdata></metainfo>

<metainfo tagname="units"><cdata><![CDATA[dpi]]></cdata></metainfo>

<metainfo tagname="ythumbnailsize">0</metainfo>

</app0data>

<exifdata>

<metainfo tagname="imagedescription"><cdata><![CDATA[]]></cdata></metainfo>

<metainfo tagname="make"><cdata><![CDATA[SONY]]></cdata></metainfo>

<metainfo tagname="0xa406">0</metainfo>

</exifdata>

<thumbdata>

<metainfo tagname="previewcompression">6</metainfo>

<metainfo tagname="0x010f"><cdata><![CDATA[SONY]]></cdata></metainfo>

<metainfo tagname="previewjpegbytecount">3474</metainfo>

</thumbdata>

<iptcdata>

<metainfo tagname="recordversion"><cdata><![CDATA[2]]></cdata></metainfo>

<metainfo tagname="objectname"><cdata><![CDATA[Meran]]></cdata></metainfo>

<metainfo tagname="keywords"><cdata><![CDATA[Südtirol]]></cdata></metainfo>

</iptcdata>

<gpsdata>

</gpsdata>

</file>

</files>

After you click the OK button, the export will start. Click on Cancel to abort the export.


Einstellungen

Program Settings

You can easily ajust several options of ImageQuery according to your way of working. Please select a configuration area from the list below:

  • Display options
  • Program Options
  • Result action


Settings Dialog

Settings Dialog Box

The settings dialog allows you to change certain aspects of program behavior.

Display tab

The display tab of the settings dialog.

Thumbnail Size

Sets the size of the thumbnail pictures in the results panes image view. While the EXIF digital camera standard says every preview picture should be 160x120 pixels in size, there are two smaller settings that allow more preview pictures to be displayed.

Query Font

Changes the font settings for the query edit window. While there is no restriction on font settings, you should try to use a font that clearly differentiates between symbols to make expression editing easier.

Result Font

Changes the font settings for the results pane.

Options tab

The options tab of the settings dialog.

Save settings to registry

More or less a debugging setting. If you uncheck this option, the program will not store its current settings to the registry on exit. When starting up, the applicatoin always tries to find the key HKCU\Software\Midnight!Software\ImageQuery\1.0

Generate preview

Normally all digital cameras and image processing software packages store a preview (thumbnail) image in the EXIF segment. This preview picture will be used for displaying the preview images in the result list. If the image has no such preview, you can generate a preview for the results display be checking this option. Please keep in mind that the program then has to read and decode the entire JPG image, resulting in a big performance penalty. It is not recommended to try this on a thousand images, unless you do have lots of coffee and a good book :-)

Use this text for Null values

Check this option, if you need a special display for Null values (values of metadata fiels not present in the current image). If no text is set, the column will be blank (and therefore undinstinguishable from a real blank character). The text “(Null)” is a common choice (like with database systems). Checking and unchecking leaves the textin the edit box intact, so you can easily try this.

Don’t ask on exit

Check this option if you do not to conform closing down ImageQuery. Good for advanced users.

Request refinement above …

Check this options if you want to abort a query that produces too many hits to be used reasonably. Enter the maximum number of hits in the edit box.

Use double quotes as string delimiter (new in 1.2.1)

Use this option to change the string delimiter for constants in queries from single to double quotes. This option has been introduced in version 1.2.1 to bemore consistent with the FROM clause, where you habe to enclose a file mask in double quotes, if it containts spaces. This is standard Windows syntax for long filenames, so you might want to set this option. The default setting remains the single quote as string delimiter for constants, just like in SQL.

Actions tab

The actions tab where you define actions on the result set.

Use this tab to define custom action for the selected files from the result pane. You may execute external programs or open URLs with this otions. Learn more about result action here.

Add

Add a new result action to the list. This action will show up in the “Result actions” menu under “Tools”.

Edit

Edit the selected action. Saved actions will show up in the “Result actions” menu under “Tools”.

Delete

Delete the selected action. Be careful, as there is no undo.


Query Syntax

When designing the query syntax, I tried to follow common sense as much as possible. If you ever programmed more than a line of code or did a SQL select statement, you should already know how to write expressions. If you are new to the concept of query expressions, just read on.

The general syntax for a query is as shown below. Click on any of the keywords to learn more about that part of a query.

SELECT <column_list>
FROM <filespec>
[ WHERE <filter> ]
[ WITH <options> ]

The first step

Let’s assume you are looking for all your jpg images in folder c:\images that have a JPG comment entered. To search for these files, you would use the expression below:

select Name from c:\images\*.jpg where JpgComment != ''

Later you will learn how to customize the output. But first we have to learn a little about the syntax of a query expression. An expression is made up of literal values, variables containing meta data or function calls. These components are combined by operators for calculations, comparisons and the like. A simple expression is 4 < 7: two literal values and one relational operator. The result is the logical value true (hopefully in your universe also <g>).

If you need information on how expressions are constructed, please select an item from the list below.

  • Values
  • Operators
  • Metadata fields
  • Functions


SELECT clause

The SELECT clause specifies the list of columns you want to have in the output.

SELECT <expression_1> [ , <expression_2> … , <expression_n> ]

If you need information on how expressions are constructed, please select an item from the list below.

  • Values
  • Operators
  • Metadata fields
  • Functions

Examples

Please keep in mind that the examples below show not complete query, but only the part with the SELECT clause!

SELECT name, size, caption

SELECT fullname, IsNull(FNumber, 'no Av!')

SELECT 'Photo taken on ' & IsNull(DateTimeOriginal, DateCreated)

Limiting the number of results

While you can permamently set a threshold for the maximum number of hits to be returned in the options, there is also an SQL-related way: insert a “TOP x” after the SELECT keyword and before the fields list, like so: SELECT TOP 5 Name, Size FROM …

Please keep in mind that in contrast to the hit limit setting you will no special notification that the results may not cover all possible matches. This is an option for the advanced user.


FROM clause

Examples

Please keep in mind that the examples below show not complete query, but only the part with the FROM clause!

FROM c:\tmp\*.jpg

FROM "i:\image lib\New Images\a*.jpg"

FROM "\\server1\pictures\*.*"


WHERE clause

WHERE acts as a kind of ‚filter’ for the files. The expression for the WHERE clause has to evaluate to a logical TRUE to include the current file in the output list. If you omit the WHERE clause completely, all files matching the file specification in the FROM clause will be processed.

Examples

Please keep in mind that the examples below show not complete query, but only the part with the WHERE clause!

WHERE size < 100000

WHERE caption != ''

WHERE (Lower(JpgComment) ~ 'moon') or (Lower(caption) ~ 'moon')


WITH clause

This is the easiest part of the query, since there currently is only one option that may be activated by using the WITH clause. If you append “WITH subdirs” to the end of a query, the program will recurse thru all subfolders of the path specified in the FROM clause.

Examples

Please keep in mind that the examples below show not complete query, but only the part with the WITH clause!

WITH subdirs


Values and Operators

Values

A value is either a constant, like 42 or the string 'Miles', or the name of a meta data field (ShutterSpeedValue). If you are using meta data fields and the current image does not contain this field, the result will be NULL value and the expression will evaluate to false.

Basic data types are:

  • Numbers, where the decimal separator is always the decimal point.
  • Strings delimited by single quotes.
  • Logical constants, either the string “true” or “false”.

Operators

This is the list of operators supported by jpglist:

  • + - * / Basic math
  • < <= less than / less than or equal to
  • > >= greater than / greater than or equal to
  • == != equals / not equal
  • ~ operand1 contains text in operand2 (e.g. keywords ~ 'moon')
  • & concatenation operator
  • and logical AND
  • or logical OR
  • not logical NOT
  • ( ) grouping


Functions

jpglist supports some functions, as well for WHERE for DISPLAY expressions:

Upper() Convert a string to upper case
Example: Upper('karl')

Important: jpglist works case-sensitive. To find all occurences of the word “beach” regardless of casing, you may want to use Upper() in the query expression, like so: Upper(caption) ~ 'BEACH'

Lower() Convert to lower case
Example: Lower(Copyright)

Pad() Pad parameter1 to the width in parameter 2. If you want the result to be left-aligned, use negative values, values > 0 result in right-alignment.
Example: Pad(Name, 32)

DatePart() Calculate a part form a datetime string. First parameter is a string with the EXIF date time format in 20 chars (yyyy:mm:dd hh:mm:ss), the second parameter is a string specifying which part of the timestamp you want to have extracted: 'DAY', 'MONTH', 'YEAR', 'HOUR', 'MIN', 'SEC'
Example: DatePart('month', DateTimeOriginal)

IsNull() This function has a meta data field as the first parameter and a value as the second parameter. If the value is not empty, the result of the function is the field’s value. If the value is empty (NULL), the result of the function is the second parameter
Example: IsNull(ImageDescription, 'no picture title available')

If() The function uses three parameters, a condition expression, the result for true and the result for false, (i.e. there is an implied “Else” between the second and third parameters.)
Example: If(Size < 1475000, 'Floppy OK', 'Too big')

Ascii() This function takes a byte value (0–255) and yields the corresponding ASCII character. This allows you to output special chars like quotes.
Example: Ascii(65)

Match() Match implements support for regular expressions when searching for string data. The first parameter is the string value or string metadata field. The secons Paramter has to be a valid regular expression. Result is locial True if there is a match, logical False if there is no match
Example: Match(Model, '*ixus$')


Syntax of Regular Expressions

Note from the author: this sections explains the usage of regular expressions for the Match() function. This is shortened end-user version of the complete developer documentation for the Delphi library that implements this feature. Library code and documentation are © 2004 Andrey V. Sorokin, Saint Petersburg, Russia.

Introduction

Regular Expressions are a widely-used method of specifying patterns of text to search for. Special metacharacters allow You to specify, for instance, that a particular string You are looking for occurs at the beginning or end of a line, or contains n recurrences of a certain character.

Regular expressions look ugly for novices, but really they are very simple (well, usually simple ;) ), handly and powerfull tool.

Simple matches

Any single character matches itself, unless it is a metacharacter with a special meaning described below.

A series of characters matches that series of characters in the target string, so the pattern "bluh" would match "bluh'' in the target string. Quite simple, eh ?

You can cause characters that normally function as metacharacters or escape sequences to be interpreted literally by 'escaping' them by preceding them with a backslash "\", for instance: metacharacter "^" match beginning of string, but "\^" match character "^", "\\" match "\" and so on.

Examples:

  foobar          matchs string 'foobar'

  \^FooBarPtr     matchs '^FooBarPtr'

Escape sequences

Characters may be specified using a escape sequences syntax much like that used in C and Perl: "\n'' matches a newline, "\t'' a tab, etc. More generally, \xnn, where nn is a string of hexadecimal digits, matches the character whose ASCII value is nn. If You need wide (Unicode) character code, You can use '\x{nnnn}', where 'nnnn' - one or more hexadecimal digits.

  \xnn     char with hex code nn

  \x{nnnn} char with hex code nnnn (one byte for plain text and two bytes for Unicode)

  \t       tab (HT/TAB), same as \x09

  \n       newline (NL), same as \x0a

  \r       car.return (CR), same as \x0d

  \f       form feed (FF), same as \x0c

  \a       alarm (bell) (BEL), same as \x07

  \e       escape (ESC), same as \x1b

Examples:

  foo\x20bar   matchs 'foo bar' (note space in the middle)

  \tfoobar     matchs 'foobar' predefined by tab

Character classes

You can specify a character class, by enclosing a list of characters in [], which will match any one character from the list.

If the first character after the "['' is "^'', the class matches any character not in the list.

Examples:

  foob[aeiou]r   finds strings 'foobar', 'foober' etc. but not 'foobbr', 'foobcr' etc.

  foob[^aeiou]r  find strings 'foobbr', 'foobcr' etc. but not 'foobar', 'foober' etc.

Within a list, the "-'' character is used to specify a range, so that a-z represents all characters between "a'' and "z'', inclusive.

If You want "-'' itself to be a member of a class, put it at the start or end of the list, or escape it with a backslash. If You want ']' you may place it at the start of list or escape it with a backslash.

Examples:

  [-az]      matchs 'a', 'z' and '-'

  [az-]      matchs 'a', 'z' and '-'

  [a\-z]     matchs 'a', 'z' and '-'

  [a-z]      matchs all twenty six small characters from 'a' to 'z'

  [\n-\x0D]  matchs any of #10,#11,#12,#13.

  [\d-t]     matchs any digit, '-' or 't'.

  []-a]      matchs any char from ']'..'a'.

Metacharacters

Metacharacters are special characters which are the essence of Regular Expressions. There are different types of metacharacters, described below.

Metacharacters - line separators

  ^      start of line

  $      end of line

  \A     start of text

  \Z     end of text

  .      any character in line

Examples:

  ^foobar     matchs string 'foobar' only if it's at the beginning of line

  foobar$     matchs string 'foobar' only if it's at the end of line

  ^foobar$    matchs string 'foobar' only if it's the only string in line

  foob.r      matchs strings like 'foobar', 'foobbr', 'foob1r' and so on

The "^" metacharacter by default is only guaranteed to match at the beginning of the input string/text, the "$" metacharacter only at the end. Embedded line separators will not be matched by "^'' or "$''.

You may, however, wish to treat a string as a multi-line buffer, such that the "^'' will match after any line separator within the string, and "$'' will match before any line separator. You can do this by switching On the modifier /m .

The \A and \Z are just like "^'' and "$'', except that they won't match multiple times when the modifier /m is used, while "^'' and "$'' will match at every internal line separator.

The ".'' metacharacter by default matches any character, but if You switch Off the modifier /s , then '.' won't match embedded line separators.

TRegExpr works with line separators as recommended at www.unicode.org ( http://www.unicode.org/unicode/reports/tr18/ ):

"^" is at the beginning of a input string, and, if modifier /m is On, also immediately following any occurrence of \x0D\x0A or \x0A or \x0D (if You are using Unicode version of TRegExpr, then also \x2028 or \x2029 or \x0B or \x0C or \x85). Note that there is no empty line within the sequence \x0D\x0A.

"$" is at the end of a input string, and, if modifier /m is On, also immediately preceding any occurrence of \x0D\x0A or \x0A or \x0D (if You are using Unicode version of TRegExpr, then also \x2028 or \x2029 or \x0B or \x0C or \x85). Note that there is no empty line within the sequence \x0D\x0A.

"." matchs any character, but if You switch Off modifier /s then "." doesn't match \x0D\x0A and \x0A and \x0D (if You are using Unicode version of TRegExpr, then also \x2028 and \x2029 and \x0B and \x0C and \x85).

Note that "^.*$" (an empty line pattern) doesnot match the empty string within the sequence \x0D\x0A, but matchs the empty string within the sequence \x0A\x0D.

Multiline processing can be easely tuned for Your own purpose with help of TRegExpr properties LineSeparators and LinePairedSeparator , You can use only Unix style separators \n or only DOS/Windows style \r\n or mix them together (as described above and used by default) or define Your own line separators!

Metacharacters - predefined classes

  \w     an alphanumeric character (including "_")

  \W     a nonalphanumeric

  \d     a numeric character

  \D     a non-numeric

  \s     any space (same as [ \t\n\r\f])

  \S     a non space

You may use \w, \d and \s within custom character classes.

Examples:

  foob\dr     matchs strings like 'foob1r', ''foob6r' and so on but not 'foobar', 'foobbr' and so on

  foob[\w\s]r matchs strings like 'foobar', 'foob r', 'foobbr' and so on but not 'foob1r', 'foob=r' and so on

TRegExpr uses properties SpaceChars and WordChars to define character classes \w, \W, \s, \S, so You can easely redefine it.

Metacharacters - word boundaries

  \b     Match a word boundary

  \B     Match a non-(word boundary)

A word boundary (\b) is a spot between two characters that has a \w on one side of it and a \W on the other side of it (in either order), counting the imaginary characters off the beginning and end of the string as matching a \W.

Metacharacters - iterators

Any item of a regular expression may be followed by another type of metacharacters - iterators. Using this metacharacters You can specify number of occurences of previous character, metacharacter or subexpression.

  *      zero or more ("greedy"), similar to {0,}

  +      one or more ("greedy"), similar to {1,}

  ?      zero or one ("greedy"), similar to {0,1}

  {n}    exactly n times ("greedy")

  {n,}   at least n times ("greedy")

  {n,m}  at least n but not more than m times ("greedy")

  *?     zero or more ("non-greedy"), similar to {0,}?

  +?     one or more ("non-greedy"), similar to {1,}?

  ??     zero or one ("non-greedy"), similar to {0,1}?

  {n}?   exactly n times ("non-greedy")

  {n,}?  at least n times ("non-greedy")

  {n,m}? at least n but not more than m times ("non-greedy")

So, digits in curly brackets of the form {n,m}, specify the minimum number of times to match the item n and the maximum m. The form {n} is equivalent to {n,n} and matches exactly n times. The form {n,} matches n or more times. There is no limit to the size of n or m, but large numbers will chew up more memory and slow down r.e. execution.

If a curly bracket occurs in any other context, it is treated as a regular character.

Examples:

  foob.*r     matchs strings like 'foobar', 'foobalkjdflkj9r' and 'foobr'

  foob.+r     matchs strings like 'foobar', 'foobalkjdflkj9r' but not 'foobr'

  foob.?r     matchs strings like 'foobar', 'foobbr' and 'foobr' but not 'foobalkj9r'

  fooba{2}r   matchs the string 'foobaar'

  fooba{2,}r  m atchs strings like 'foobaar', 'foobaaar', 'foobaaaar' etc.

  fooba{2,3}r matchs strings like 'foobaar', or 'foobaaar' but not 'foobaaaar'

A little explanation about "greediness". "Greedy" takes as many as possible, "non-greedy" takes as few as possible. For example, 'b+' and 'b*' applied to string 'abbbbc' return 'bbbb', 'b+?' returns 'b', 'b*?' returns empty string, 'b{2,3}?' returns 'bb', 'b{2,3}' returns 'bbb'.

You can switch all iterators into "non-greedy" mode (see the modifier /g ).

Metacharacters - alternatives

You can specify a series of alternatives for a pattern using "|'' to separate them, so that fee|fie|foe will match any of "fee'', "fie'', or "foe'' in the target string (as would f(e|i|o)e). The first alternative includes everything from the last pattern delimiter ("('', "['', or the beginning of the pattern) up to the first "|'', and the last alternative contains everything from the last "|'' to the next pattern delimiter. For this reason, it's common practice to include alternatives in parentheses, to minimize confusion about where they start and end.

Alternatives are tried from left to right, so the first alternative found for which the entire expression matches, is the one that is chosen. This means that alternatives are not necessarily greedy. For example: when matching foo|foot against "barefoot'', only the "foo'' part will match, as that is the first alternative tried, and it successfully matches the target string. (This might not seem important, but it is important when you are capturing matched text using parentheses.)

Also remember that "|'' is interpreted as a literal within square brackets, so if You write [fee|fie|foe] You're really only matching [feio|].

Examples:

  foo(bar|foo)  matchs strings 'foobar' or 'foofoo'.

Metacharacters - subexpressions

The bracketing construct ( ... ) may also be used for define r.e. subexpressions (after parsing You can find subexpression positions, lengths and actual values in MatchPos, MatchLen and Match properties of TRegExpr, and substitute it in template strings by TRegExpr.Substitute ).

Subexpressions are numbered based on the left to right order of their opening parenthesis.

First subexpression has number '1' (whole r.e. match has number '0' - You can substitute it in TRegExpr.Substitute as '$0' or '$&').

Examples:

  (foobar){8,10}  matchs strings which contain 8, 9 or 10 instances of the 'foobar'

  foob([0-9]|a+)r matchs 'foob0r', 'foob1r' , 'foobar', 'foobaar', 'foobaar' etc.

Metacharacters - backreferences

Metacharacters \1 through \9 are interpreted as backreferences. \<n> matches previously matched subexpression #<n>.

Examples:

  (.)\1+         matchs 'aaaa' and 'cc'.

  (.+)\1+        also match 'abab' and '123123'

  (['"]?)(\d+)\1 matchs '"13" (in double quotes), or '4' (in single quotes) or 77 (without quotes) etc

Perl extensions

(?imsxr-imsxr)

You may use it into r.e. for modifying modifiers by the fly. If this construction inlined into subexpression, then it effects only into this subexpression

Examples:

  (?i)Saint-Petersburg       matchs 'Saint-petersburg' and 'Saint-Petersburg'

  (?i)Saint-(?-i)Petersburg  matchs 'Saint-Petersburg' but not 'Saint-petersburg'

  (?i)(Saint-)?Petersburg    matchs 'Saint-petersburg' and 'saint-petersburg'

  ((?i)Saint-)?Petersburg    matchs 'saint-Petersburg', but not 'saint-petersburg'

(?#text)

A comment, the text is ignored. Note that TRegExpr closes the comment as soon as it sees a ")", so there is no way to put a literal ")" in the comment.


Meta data fields

Meta data means additional information beside the picture itself that is stored in the .jpg file. Nearly all digital cameras and image processing software store and/or retrieve this additional information.

  • EXIF fields
  • IPTC fields
  • FILE fields


Nullwerte

NULL values

Introduction

NULL values is a term that is usedfor undefined data. This is not a numerical value of zwei (that’s why NUll is always spelled out), but indicates that the current field is not present in the image. Take the query below, for example:

SELECT Name, ImageWidth, ImageHeight FROM *.jpg

It may well be that some of the jpg files processed have no EXIF information, so there is no value for “ImageWidth” or “ImageHeight”. This results in a Null value, which is different from a (btw invalid) ImageWidth of Zero pixels. Therefore ImageQuery allows to test for Null values and select a replacement text, change the field or use an IF function to branch on Null or non-Null values. The program options allow for the definition of a default replacement text for Nulls.

Examples

Let’s look at the query below (without considering the WHERE part):

SELECT Name, IsNull(CopyrightNotice, 'No Copyright defined') FROM *.jpg WHERE ByLine != ''

Here the IsNull() function is used to check whether CopyrightNotice yields a Null value (because there is no such information in the current file). Is this is the case, the text “No copyright defined” will be displayed.

Another possible use is for queries that automatically check two fields. As the EXIF standard is not a very strict “standard”, there a digital cameras that put the exposure time in the field “ExposureTime”, some other models use the field “ShutterSpeedValue” (while the internal representation is different, the rendered data is the same, the time the shutter has been opened in the form of 1/seconds). Now, using the IsNull function, checking for one field and automatically selecting the other if the first yields Null is a breeze:

SELECT Name, IsNull(ShutterSpeedValue, ExposureTime) FROM *.jpg

As you can see, learning about Null values and the meta data fields can save you work and lets you write better quries.


About Midnight!Software

Midnight!Software is one of my ways to give back a little of all that ideas, help and support I received over the last twenty years of working with computers. While I now do only a little bit (no pun intended) of programming these days in my profession, I still can’t keep myself away from a little coding in my spare time. As I don’t do this for a living, but rather as a kind of mental training like playing chess, I decided long ago to give these program away for free. Maybe someone finds them useful, too. While I have no idea if a copy of my first program is still around somewhere (a DNA triplet / amino-acid conversion routine for a PET2001), I hope that newer program may still be on the net for some time.

You can reach my and find out some more at http://www.ArminHanisch.de or you can try Google on me.

Armin Hanisch, Fall 2004


Credits

The regular expression support unit is based on work copyrighted © 2000 by Andrey V. Sorokin, based on the VB routines of Henry Spencer, Copyright © 1986 University of Toronto.

I would like to thank Douglas Gregor and Thomas Niemann for their works about parser design as well as Aho/Sethi/Ullmann for their famous ‘gragon book’ about compiler design.

This program would no have been possible without information from all these nice andhelpful people out on the web who collected and shared informations about EXIF and IPTC formats. The code for connecting Delphi to the new HTML help format was graciously provided on the web by Robert Chandler from The Helpware Group (http://www.Helpware.net).

A special “Thank you“ goes to Tim Bishop (http://www.TimBishop.com) for his review of this documentation and a lot of good suggestions for examples. If you are a native speaker and find this documentation useful, it is mostly be-cause of Tim’s editing.

John Perkins suggested the XML export feature and kindly provided feedback and took over the testing work. He pointed out several ways to ease XSLT processing of the output. Thanks again, John!


Aktionsdatei

Technical Information

Who should read this section?

This section describes several technical aspects of ImageQuery. While this information may be quite boring for the end user, administrators, support staff or power users will find all informations about customizing ImageQuery.

Where does ImageQuery put its user files?

ImageQuery does not need write access to the application folder. All user-specific files are stored in a subfolder of the application data folder in the user’s profile. User settings are stored in the HKEY_CURRENT_USER hive of the registry.

User-sepcific files in the APPDATA folder

ImageQuery reads the environment variable APPDATA to find the application settings folder, then uses the subfolder „\Midnight!Software\ImageQuery“ to store user files like query buffer or result actions. If APPDATA does not point to a valid folder, the query buffer and result actions functionality is disabled.

ResultActions.ini

This file keeps the definitions of user-defined result actions. Format of the file is like any other INI file. Each section defines an action. See the sample below:

[Action42]

Menu=IrfanView

Program=C:\Programme\IrfanView\i_view32.exe

CmdLine=$filename

Shortcut=ALT+I

Sections names are for internal identification only and should not be changed during program run-time. The other keys should be self-explanatory. The syntax for shortcut definition allows ALT, CTRL or SHIFT as prefix, followed by a plus sign and the key character, all without blanks. Invalid settings will be ignored.

Querylist.txt

This file contains a list of queries for re-use. Each line starts with the name of the query (shown in the combo box). Query text is separated by an equal sign. Every occurrence of the vertical bar in the query text will be replaced by line break in the editor. See a sample below:

Select Name, Size, Caption|from c:\tmp\*.jpg|where Caption != ''

Registry values

ImageQuery stores information in the registry using the key below:

HKEY_CURRENT_USER\Software\Midnight!Software\ImageQuery\1.0

Her is alist of keys and values. These values may be set from outside the program also (e.g. group policies).

LastQuery | REG_SZ | Der Text der jeweils letzten Query
ThumbnailWidth | REG_DWORD | Breite der Vorschaubilder in Pixel (sollte 160, 120 oder 90 sein)
ThumbnailHeight | REG_DWORD | Höhe der Vorschaubilder in Pixel (sollte 120, 90 oder 66 sein)
GeneratePreview | REG_DWORD | 1 = Vorschau erzeugen, falls kein EXIF-Thumbnail (Vorsicht, sehr langsam)
UseNullText | REG_DWORD | 1 = Den Inhalt von NullText verwenden
NullText | REG_SZ | Ersatztext für Nullwerte (nicht vorhandene Metadatenfelder)
DontAskOnExit | REG_DWORD | 1 = Beim Beenden nicht nachfragen
RefinementLimit | REG_DWORD | Anzahl der maximalen Treffer, bevor eine Abfrage abgebrochen wird, falls EnforceRefinement auf 1 gesetzt wurde
EnforceRefinement | REG_DWORD | 1 = Abfragebegrenzung aktiv (s. RefinementLimit)
QueryFontFace | REG_SZ | Schriftartname
QueryFontSize | REG_DWORD | Schriftartgöße
ResultFontFace | REG_SZ | Schriftartname
ResultFontSize | REG_DWORD | Schriftartgröße
ResultViewStyle (neu ab 1.1) | REG_SZ | Detail = Spaltendarstellung List = Liste Preview = Vorschaubilder

Liste der Werte in der Registry

Customizing the sidebar contents

The contents of the sidebar are filled from a text file with the name Sidetree.ini in the application folder of ImageQuery. This file contains one tree view entry per line. The hierarchy of the entries is built by indentation with a single space per level. Be careful not to use more than one space character per level or the file will not be used by ImageQuery and the sidebar will be disabled (you will get a message at start-up if this is the case). If you want to display a short tool tip or help text, you can add an equal sign after the entry name, followed by the text to be displayed (max. 80 chars).

Here is a short sample for the sidetree.ini file:

EXIF Fields

Group 1

Sub-Item of group 1=This is the help text

ANother sub-item=Wow, another help text

Group 2=Help texts for groups are OK

Group 2 sub-item

IPTC Fields

An entry=You don’t need to create groups, this will do fine.

A sample sidetree.ini file

User-specific sidebar contents

If you want to have user-specific sidebar content, just put a sidetree.ini file in the application data file for ImageQuery (which is located under you user profile folder, or use APPDATA env variable). This will automatically override the default file from the ImageQuery folder.

Other informations

Localizing ImageQuery

ImageQuery can be localized for other languages. In contrast to other freeware apps, you can also adjust layout and sizing of controls to make the text fit into place. All language files hasve to be stored in a subfolder under the ImageQuery application folder. This folder has to be named “Lang”.

Language files are simple text files with an INI-file layout. The section names define the forms, while key name specify controls on a form. Names are self-explanatory. Additionally you may want to check the German and English localization file. The language file has to be named according to the short country codes for Windows locales plus the extension “.lng” (e.g. en-us.lng for English, es-es.lng for spanish-Spain, but ca.lng for Catalan or el.lng for Greek).

You can have comments in the file. All lines starting with a semi-colon “;” are considered comments and ignored.

Languages may be changed at run-time without problem. You may start the program with a given locale by providing the command line option /lcid:<code>, where <code> is the LCID number for a given language in decimal, e.g. 1031 for de-de (German-Germany) or 1033 for en-us (English-United States).

The author would like to receive a copy of you translation file to provide it for download to other users. You can of course provide a comment section in the beginning of the file stating your name and eMail-Adress and/or web link to show that you did all the work.

Test for valid jpg files

ImageQuery tries to detect if a file really is a JPEG image before processing it. This will prevent program crashes (if you accidentally use a file mask like *.doc) and allows you to use different extensions or file masks (like *.jp*). To qualify for a valid JPEG image,

• the files has to start with 0xFF, 0xD8.

• the JFIF segment marker 0xFF, 0xE0 must be found.

• the Image data marker 0xFF, 0xDB must be found.

Note: the specifications avialabe do state that every valid JPG or DCF (digital camera format) file has to end with the end marker sequence 0xFF, 0xD9 as the last two bytes. While the majority of image files I encountered during testing follwed that rule, a remarkable number of files did not. Instead they padded the file after the end marker to some border (mostly the next 256 byte). Therefore I decided not to test for the end marker, as you may miss some image files during searching. Any comments or additional information on that subject would be appreciated.


Exif field names

ApertureValue

Artist

BitsPerSample

BrightnessValue

CFAPattern

ColorSpace

ComponentsConfiguration

CompressedBitsPerPixel

Compression

Copyright

DateTime

DateTimeDigitized

DateTimeOriginal

Exif IFD

ExifVersion

ExposureBiasValue

ExposureIndex

ExposureProgram

ExposureTime

FicalPlaneResolutionUnit

FileSource

Flash

FlashEnergy

FlashPixVersion

FNumber

FocalLength

FocalPlaneXResolution

FocalPlaneYResolution

ImageDescription

ImageLength

ImageWidth

ISOSpeedRatings

JPEGInterchangeFormat

JPEGInterchangeFormatLength

LightSource

Make

MakerNote

MaxApertureValue

MeteringMode

Model

OECF

Orientation

PhotometricInterpretation

PixelXDimension

PixelYDimension

PlanarConfiguration

PrimaryChromaticities

ReferenceBlackWhite

ResolutionUnit

RowsPerStrip

SamplesPerPixel

SceneType

SensingMethod

ShutterSpeedValue

Software

SpatialFrequencyResponse

SpectralSensitivity

StripByteCounts

StripOffsets

SubjectDistance

SubjectLocation

SubSecTime

SubSecTimeDigitized

SubSecTimeOriginal

TransferFunction

UserComment

WhitePoint

XResolution

YCbCrCoefficients

YCbCrPositioning

YCbCrSubSampling

YResolution


FileInfo field names

JpgComment

FullName

Size

DateCreated

DateModified

Path

Name


IPTC-Fields

ActionAdvised

ByLine

ByLineTitle

Caption

Category

City

Contact

ContentLocationCode

ContentLocationName

CopyrightNotice

CountryCode

CountryName

Credit

Custom1 - Custom20

DateCreated

DigitalCreationDate

DigitalCreationTime

EditorialUpdate

EditStatus

ExpirationDate

ExpirationTime

FixtureIdentifier

Headline

ImageOrientation

ImageType

Keywords

LanguageIdentifier

ObjectCycle

ObjectName

OriginalTransmissionReference

OriginatingProgram

ProgramVersion

ProvinceState

RecordVersion

ReferenceDate

ReferenceNumber

ReferenceService

ReleaseDate

ReleaseTime

Source

SpecialInstructions

SubjectReference

SubLocation

SupplementalCategory

TimeCreated

Urgency

WriterEditor


License

ImageQuery is Copyright (c) 2004 by A. Hanisch. This tool is freeware and may be distributed freely, provided this text will be in the archive. You may also use it in commercial environments or include it in freeware websites or CD collections. While this program has been extensively tested, there is a possibility that the code stills contains errors. Usage of the software is granted on as "as is" basis. All I can guarantee is that the program will take up disk space on your machine.

Disclaimer

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRAN-TIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANT-ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROF-ITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LI-ABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLI-GENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Feedback & support

Please understand that I can give no individual support as I work on ImageQuery in my (rare) spare time. Everything you need to know is contained in this document. Additional information may be made available at the URL below. Currently there is no fixed schedule for development, but suggestions, corrections and bug fixes will be made available at my web site, which can be found at www.ArminHanisch.de (English version available).

The author would like to receive feedback about the program. You can find my current email address at http://www.ArminHanisch.de/contact.html. I will try to answer email as fast as possible, but please allow a day or two.